import config from '@/config';
import RequestBase from '@/utils/request.js';

const baseRequest = new RequestBase(config.equipment);

//获取点检任务列表
export function getTask(data) {
  return baseRequest.get('/mobile/dfm/deviceExecutorTask/list', data);
}

// 获取巡检信息
export function queryTask(id) {
  return baseRequest.get('/mobile/dfm/deviceExecutorTask/' + id);
}

//获取巡检任务执行标准列表
export function queryExecutorTask(taskId, deviceId) {
  return baseRequest.get(
    `/mobile/dfm/deviceExecutorTask/execute/${taskId}/${deviceId}`
  );
}

//添加巡检任务结果
export function completeMaintenanceTask(data) {
  return baseRequest.post('/mobile/dfm/deviceExecutorTask/complete', data);
}

//获取点检标准
export function getPointInspectStandard(params) {
  return baseRequest.get(`/dfm/overhaul/standard/device/${params}`)
}

//获取点检记录
export function getPointInspectRecord(params) {
  return baseRequest.get(`/dfm/overhaul/task/getTicketList`, params)
}
